Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

170
Vistas
Trying to make a discord but I keep getting the error "required is not defined"

I'm really new at this and I'm trying to get the bot to come online but no matter what I do the error message comes up, I also downloaded requirejs but it doesn't seem to be working. basically, I have no idea what I'm doing and need help.

const {Clients, Intents} = require(discord.js);
const TOKEN = '************************************************'
const client = new Client({
    intents: [
        Inents.FLAGS.GUILDS,
        Intents.FLags.GUILD_MESSAGES,
    ]
});




client.once('ready', () => {
    console.log('Logged in as ${client.user.tag}')
});
client.login(TOKEN);
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You need to put discord.js in quotes like this:

const {Clients, Intents} = require("discord.js");
about 4 years ago · Juan Pablo Isaza Denunciar

0

A couple things. Don't give out your token on public websites. Discord has probably dmed you saying you gave out your token here, but still. I'd recommend creating a .env file with the 'dotenv' package (if you know what that is.) just to keep your token private.

On your 5th line, Intents has a typo, it says Inents. So, make sure that's fixed, and same with the 6th line. It should be FLAGS not FLags

The reason "require" isn't defined is because you need to put discord.js in quotations like this.

const {Clients, Intents} = require('discord.js');

If you have any other errors, feel free to reply with it. Have a great day.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda